package com.cupcorn.lib.display;

import org.andengine.opengl.font.Font;
import org.andengine.opengl.font.FontFactory;
import org.andengine.opengl.texture.TextureOptions;

import com.cupcorn.lib.Utils;
import com.cupcorn.lib.game.GameEngine;
import com.cupcorn.lib.game.element.GameElementFont;

public class DisplayFont
{
	public Font[]	font;
	
	public DisplayFont(GameEngine engine, GameElementFont[] gameElementFonts)
	{
		font = new Font[gameElementFonts.length];
		for (int i = 0; i < gameElementFonts.length; i++)
		{
			font[i] =
				FontFactory.createFromAsset(engine.getFontManager(), engine.getTextureManager(), 512, 512, TextureOptions.BILINEAR, engine.getAssets(),
					gameElementFonts[i].path, Utils.getRatioHeight(gameElementFonts[i].size, gameElementFonts[i].ratio), true, gameElementFonts[i].color);
			font[i].load();
		}
		
	}
}
